#pragma once

#include <iostream>
#include <time.h>
#include <string>

std::string GetCurTime()
{
    time_t t = time(nullptr);
    struct tm *cur = localtime(&t);
    char currtime[32];
    snprintf(currtime, sizeof(currtime), "%d-%d-%d %d:%d:%d ",
        cur->tm_year,
        cur->tm_mon,
        cur->tm_mday,
        cur->tm_hour, 
        cur->tm_min,
        cur->tm_sec
    );
    return currtime;
}